module RecommendHelper
  def entity_href(item)
    item.entity_type == "Song" ? fullscreen_play_path(play_type: 'once', song_id: item.entity.id) : playlist_path(item.entity.id)
  end

  def entity_image_url(item, special = false)
    if special
      item.entity_type == "Song" ? "/images/recommends/#{item.entity.uuid}_recommend.jpeg" :
        "/images/recommends/p#{item.entity.serial_id}_recommend.jpeg"
    else
      item.entity_type == "Song" ? "/images/recommends/#{item.entity.uuid}_recommend.jpeg" :
        "/images/playlists/p#{item.entity.serial_id}.jpeg"
    end
  end
end
